<?php

$this->load->library('login_manager');
     
$user = $this->login_manager->get_user();
if($user !== FALSE){
    $this->smarty->assign('user_info', $user[0]);
}else{
	redirect(site_url('admin/cpanel'));
}